package com.itheima.demo03;

public class Employee {
    //1.类名见名知意
    //2.定义私有成员变量

    private String id;//工号
    private String name;//姓名
    private double salary;//工资

    //3.定义空参构造、全部参数构造方法

    public Employee() {
    }

    public Employee(String id, String name, double salary) {
        this.id = id;
        this.name = name;
        this.salary = salary;
    }

    //4.定义成员变量的set/get方法


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    //5.定义其他方法

    public void word(){
        System.out.println("员工在工作");
    }

    public void eat(){
        System.out.println("员工在吃饭");
    }
}
